<template>
	<view class="details">
		<view class="img" v-for="item in list"  :key="item.index" >
			<img :src="item.cover_image_url"></img>
		</view>
	</view>
</template>

<script>
	
	export default{
		data(){
			return{
				list:[],
				id:0
			}
			},
			
			methdos:{
				
			},
			 
			onLoad(options) {
				console.log(options.id)
				this.id = options.id
				uni.showLoading({
					title:'精彩即将到来...'
				})
				uni.request({
					url:'/dpc/v2/pweb/topic/'+options.id+'',
					success:(res)=> {
						uni.hideLoading()
						console.log(res.data.data.topic_info.comics)
						this.list = res.data.data.topic_info.comics
					}
				})
			},
			
			// ifdef APP-PLUS
			
			onLoad(options) {
				console.log(options.id)
				this.id = options.id
				uni.showLoading({
					title:'精彩即将到来...'
				})
				uni.request({
					url:'/dpc/v2/pweb/topic/'+options.id+'',
					success:(res)=> {
						uni.hideLoading()
						console.log(res.data.data.topic_info.comics)
						this.list = res.data.data.topic_info.comics
					}
				})
			},
			
			//endif
			
			// 导航右侧按钮的事件
			onNavigationBarButtonTap(e) {
			    console.log("success",e) 
					   // 把当前漫画的id 存到本地
					   // sessionStorage.setItem(this.id)
					 uni.setStorageSync("id",this.id)
					 let aa = uni.getStorageSync("id")
					 console.log(aa)
					 uni.showToast({
					 	title:'收藏',
					 })
			},
	}
	
</script>

<style>
	.img{
		width: 100%;
		height: auto;
	}
	img{
		width: 100%;
		height: auto;
	}
</style>
